[IA64] Remove use of hpsim console
authorawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Mon, 12 Feb 2007 16:48:56 +0000 (09:48 -0700)
committerawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Mon, 12 Feb 2007 16:48:56 +0000 (09:48 -0700)
This makes all domain boot messages come out through xencons.  Previously
the hpsim console allowed an early console via Xen.  Also, make xencons
the preferred console unless a console is explicitly provided.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
linux-2.6-xen-sparse/arch/ia64/hp/sim/Makefile [deleted file]
linux-2.6-xen-sparse/arch/ia64/kernel/setup.c

diff --git a/linux-2.6-xen-sparse/arch/ia64/hp/sim/Makefile b/linux-2.6-xen-sparse/arch/ia64/hp/sim/Makefile
deleted file mode 100644 (file)
index b0916cd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# ia64/platform/hp/sim/Makefile
-#
-# Copyright (C) 2002 Hewlett-Packard Co.
-#      David Mosberger-Tang <davidm@hpl.hp.com>
-# Copyright (C) 1999 Silicon Graphics, Inc.
-# Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
-#
-
-obj-y := hpsim_irq.o hpsim_setup.o hpsim.o
-obj-$(CONFIG_IA64_GENERIC) += hpsim_machvec.o
-
-obj-$(CONFIG_HP_SIMETH)        += simeth.o
-obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
-obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
-obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
-obj-$(CONFIG_XEN) += simserial.o
-obj-$(CONFIG_XEN) += hpsim_console.o
index 1fd352463c9faffb0042d5928d571da580439794..e33b4aeac9a0856994452f61116d9afd8c9fd2e8 100644 (file)
@@ -375,16 +375,6 @@ early_console_setup (char *cmdline)
 {
        int earlycons = 0;
 
-#ifdef CONFIG_XEN
-#ifndef CONFIG_IA64_HP_SIM
-       if (is_running_on_xen()) {
-               extern struct console hpsim_cons;
-               hpsim_cons.flags |= CON_BOOT;
-               register_console(&hpsim_cons);
-               earlycons++;
-       }
-#endif
-#endif
 #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
        {
                extern int sn_serial_console_early_setup(void);
@@ -558,6 +548,45 @@ setup_arch (char **cmdline_p)
                        conswitchp = NULL;
 #endif
                }
+               
+               /*
+                * If a console= is NOT specified, we assume using the
+                * xencons console is desired.  By default, this is ttyS0
+                * for dom0 and tty0 for domU.
+                */
+               if (!strstr(*cmdline_p, "console=")) {
+                       char *p, *q, name[5];
+                       int offset = 0;
+
+                       if (is_initial_xendomain())
+                               strncpy(name, "ttyS", 4);
+                       else
+                               strncpy(name, "tty", 3);
+
+                       p = strstr(*cmdline_p, "xencons=");
+
+                       if (p) {
+                               p += 8;
+                               if (!strncmp(p, "ttyS", 4)) {
+                                       strncpy(name, p, 4);
+                                       p += 4;
+                                       offset = simple_strtol(p, &q, 10);
+                                       if (p == q)
+                                               offset = 0;
+                               } else if (!strncmp(p, "tty", 3) ||
+                                          !strncmp(p, "xvc", 3)) {
+                                       strncpy(name, p, 3);
+                                       p += 3;
+                                       offset = simple_strtol(p, &q, 10);
+                                       if (p == q)
+                                               offset = 0;
+                               } else if (!strncmp(p, "off", 3))
+                                       offset = -1;
+                       }
+
+                       if (offset >= 0)
+                               add_preferred_console(name, offset, NULL);
+               }
        }
        xencons_early_setup();
 #endif